package cn.lizemin.decorator.version2;


import cn.lizemin.decorator.version2.drink.Coffee;
import cn.lizemin.decorator.version2.drink.Drink;
import cn.lizemin.decorator.version2.drink.NaiXue;
import cn.lizemin.decorator.version2.flavor.Sugar;
import cn.lizemin.decorator.version2.flavor.TangLiao;
import cn.lizemin.decorator.version2.flavor.WeiJing;

/**
 * @author lzm
 * @version 1.0
 * @description: TODO
 * @date 2022/4/14 11:29
 */
public class Client {
    /**
     * 程序的入口
     */
    public static void main(String[] args) {
        System.out.println("--------------------对奈雪加糖-----------------------");
        System.out.println("---------加糖前-----------");
        Drink naiXue = new NaiXue();
        System.out.println(naiXue.getDescription());

        System.out.println("---------加糖后-----------");
        naiXue = new Sugar(naiXue);
        System.out.println(naiXue.getDescription());

        System.out.println("--------------------对奈雪加汤料-----------------------");
        naiXue = new TangLiao(naiXue);
        System.out.println(naiXue.getDescription());

        System.out.println("--------------------对奈雪加味精-----------------------");
        naiXue = new WeiJing(naiXue);
        System.out.println(naiXue.getDescription());


        System.out.println("--------------------对咖啡加糖-----------------------");
        System.out.println("---------加糖前-----------");
        Drink coffee = new Coffee();
        System.out.println(coffee.getDescription());
        System.out.println("---------加糖后-----------");
        coffee = new Sugar(coffee);
        coffee = new Sugar(coffee);
        System.out.println(coffee.getDescription());

        System.out.println("--------------------对咖啡加味精-----------------------");
        coffee = new WeiJing(coffee);
        System.out.println(coffee.getDescription());

    }
}
